//
//  BZUCRegisterVC.m
//  Pods
//
//  Created by quheng on 2017/8/29.
//
//

#import "BZUCRegisterVC.h"
#import "BZUCRegisterWrapperV.h"
#import <Masonry/Masonry.h>
#import <BZPreHeaderComponent/BZPreHeaderComponent.h>
#import <BZBaseWidget/BZBaseWidget.h>
#import "BZUCInputVModel.h"

@interface BZUCRegisterVC ()

@end

@implementation BZUCRegisterVC

- (void)viewDidLoad {
    [super viewDidLoad];

    self.title = @"注册";
    self.view.backgroundColor = [UIColor whiteColor];
    BZUCRegisterWrapperV *registerWrapperV = [[BZUCRegisterWrapperV alloc]init];
    registerWrapperV.backgroundColor = [UIColor whiteColor];
    [self.view addSubview:registerWrapperV];
    
    registerWrapperV.contentSize = CGSizeMake(SCREEN_WIDTH, SCREEN_HEIGHT);
    
    self.automaticallyAdjustsScrollViewInsets = NO;
    
    [registerWrapperV mas_makeConstraints:^(MASConstraintMaker *make) {
        
        make.left.equalTo(self.view);
        make.right.equalTo(self.view);
        make.bottom.equalTo(self.view);
        make.top.equalTo(self.view).with.offset(64);
    }];
    
    
    NSArray *strArr = @[@"输入手机号码",@"请输入验证码",@"密码6~20位字符",@"再次确认密码",@"昵称,最多11位"];
    
    NSMutableArray *arr = [NSMutableArray arrayWithCapacity:5];
    for (NSUInteger i = 0; i < 5; i++) {
        
        BZUCInputVModel *model = [[BZUCInputVModel alloc]init];
        
        model.iconVWidth = 0;
        model.placeholderText = strArr[i];
        model.placeholderColor = [UIColor colorWithRed:0.64 green:0.51 blue:0.43 alpha:1.00];
        model.placeholderFont = [UIFont systemFontOfSize:15];
        if (i == 1) {
            model.timerBtnW = 75;
            model.textLimit = 6;
            model.keyboardType = UIKeyboardTypeNumberPad;
        }else if (i == 0){
            model.textLimit = 11;
            model.keyboardType = UIKeyboardTypeNumberPad;
        }else{
            model.keyboardType = UIKeyboardTypeDefault;
            model.textLimit = 20;
        }
        [arr addObject:model];
    }
    
    registerWrapperV.viewData = [arr copy];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
